package im.xz.cn.xiacore.methods;

import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.jetbrains.annotations.Nullable;

import java.util.ArrayList;

public class itemStack {
    public static @Nullable ItemStack createItemStack(Material material, String displayName, String lore1, String lore2, String lore3, int amount,boolean light) {
        ItemStack itemStack = new ItemStack(material);
        ItemMeta meta = itemStack.getItemMeta();
        meta.setDisplayName(displayName);
        ArrayList<String> lore = new ArrayList<>();
        lore.add(lore1);
        lore.add(lore2);
        lore.add(lore3);
        itemStack.setAmount(amount);
        meta.setLore(lore);
        meta.setEnchantmentGlintOverride(light);
        itemStack.setItemMeta(meta);

        return itemStack;
    }
}